<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li  class="active"><a href="{:url('register/adduser')}">消费记录</a></li>

		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('register/addConsume')}">

			<div class="form-group">
				<label for="input-user_reg" class="col-sm-2 control-label"><span class="form-required"></span>消费金额</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-user_reg" name="money" placeholder="">

					<input type="hidden" class="form-control" id="" name="id" placeholder="" value="{$id}">
					<input type="hidden" class="form-control" id="" name="rank_id" placeholder="" value="{$register.lev}">
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_reg" class="col-sm-2 control-label"><span class="form-required"></span>选择商品</label>
				<div class="col-md-6 col-sm-10">
					<select name="goods_id">
						<foreach name="goodsList" item="vo">
							<option value="{$vo.id}">{$vo.goods_name}</option>
						</foreach>
					</select>
				</div>
			</div>

			<!--<div class="form-group">
				<label for="input-user_reg" class="col-sm-2 control-label"><span class="form-required"></span>是否充值会员</label>
				<div class="col-md-6 col-sm-10">
					<input type="radio"  id="" name="type" placeholder="" value=1 checked>否
					<input type="radio"  id="" name="type" placeholder="" value=0>是
				</div>
			</div>-->




			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button  type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
<script>
	$(function(){
	    $('.btn').bind('click',function(){
            var mon = $(":input[name='money']").val();

            if(mon == 58){
               var is_ture = confirm('请问是升级成社员吗？');
               if(is_ture){
					$(":input[name='type']").val(0);
			   }else{
                   $(":input[name='type']").val(1);
			   }
			}else{
                $(":input[name='type']").val(1);
			}
			//$('form').submit();
            //alert($(":input[name='type']").val());
		})



	})
</script>
</html>